package org.rc.entity;

import lombok.Data;
import org.rc.dto.DczAddDto;
import org.rc.dto.DczUpdateDto;

@Data
public class DczMember {

    private Long id;

    private Long dczId;

    private String name;

    private String phoneNo;

    private Integer post;

    public static DczMember getInstance(DczAddDto.Member member){
        DczMember dczMember = new DczMember();
        dczMember.setName(member.getName());
        dczMember.setPhoneNo(member.getPhoneNo());
        dczMember.setPost(member.getPost());
        return dczMember;
    }

    public static DczMember getInstance(DczUpdateDto.Member member){
        DczMember dczMember = new DczMember();
        dczMember.setName(member.getName());
        dczMember.setPhoneNo(member.getPhoneNo());
        dczMember.setPost(member.getPost());
        return dczMember;
    }

}
